<%= error_messages_for 'resource' %>

<!--[form:resource]-->
<p><label for="resource_url">Url</label><br/>
<%= text_field 'resource', 'url', :onblur=>'Element.show(\'loading\')'%>
<div id="url_validation_msg" class="formError"></div>
</p>
<%= observe_field 'resource_url',
:update => :resource_url_info,
:url => {:controller => 'resources',
         :action=> 'validate_url_uniqueness'},
         :with => "'resource_url='+escape($F('resource_url'))" %>
<%= observe_field 'resource_url',
:update => :resource_url_info,
:url => {:controller => 'resources',
         :action=> 'get_resource_title'},
         :with => "'resource_url='+escape($F('resource_url'))" %>
<div id="resource_url_info"></div>
<div id="loading" style="display:none">
loading...
</div>
<p><label for="resource_title">Title</label><br/>
<%= text_field 'resource', 'title', :style=>"display:none"%></p>

<p><label for="resource_description">Description</label><br/>
<%= text_area 'resource', 'description', :style=>"display:none"%></p>

<!--[eoform:resource]-->

